package com.ck567.syn;

/**
 * @author wuhao
 * @date 2021/1/14 17:41
 */
public class TestOne {
    public static void main(String[] args) {
        /**
         * 对象锁，同一个对象
         */
        SynThread synThread = new SynThread();
        Thread A_Thread_01 = new Thread(synThread,"A_Thread_01");
        Thread A_Thread_02 = new Thread(synThread,"A_Thread_02");
        Thread B_Thread_01 = new Thread(synThread,"B_Thread_01");
        Thread B_Thread_02 = new Thread(synThread,"B_Thread_02");
        Thread C_Thread_01 = new Thread(synThread,"C_Thread_01");
        Thread C_Thread_02 = new Thread(synThread,"C_Thread_02");
        A_Thread_01.start();
        A_Thread_02.start();
        B_Thread_01.start();
        B_Thread_02.start();
        C_Thread_01.start();
        C_Thread_02.start();


    }
}
